# Find the native NANOFLANN headers and libraries.
#
#  NANOFLANN_INCLUDE_DIRS - where to find nana/nana.h, etc.
#  NANOFLANN_FOUND        - True if nana found.

# Look for the header file.
FIND_PATH(NANOFLANN_INCLUDE_DIR NAMES nanoflann/nanoflann.hpp
      PATHS
      ${CMAKE_SOURCE_DIR}/include
      ${CMAKE_SOURCE_DIR}/../include
      ${CMAKE_INSTALL_PREFIX}/include
      ${KDE4_INCLUDE_DIR}
      PATH_SUFFIXES NANOFLANN
      )
MARK_AS_ADVANCED(NANOFLANN_INCLUDE_DIR)

# handle the QUIETLY and REQUIRED arguments and set NANOFLANN_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NANOFLANN DEFAULT_MSG NANOFLANN_INCLUDE_DIR)

IF(NANOFLANN_FOUND)
  SET(NANOFLANN_INCLUDE_DIRS ${NANOFLANN_INCLUDE_DIR})
ELSE(NANOFLANN_FOUND)
  SET(NANOFLANN_INCLUDE_DIRS)
ENDIF(NANOFLANN_FOUND)
